from sqlalchemy import Column, Integer, String, ForeignKey, Table, Date, DateTime, Boolean
from sqlalchemy.orm import relationship
from .__basemodel__ import Model
import uuid
from datetime import datetime

# ondelete为CASCADE时，其外键关联的表记录被删除时，此记录也被删除，这样就可以直接使用query.delete()方法了。


class DotaFunctioneer(Model):
    '''用户表'''

    __tablename__ = 'dota_functioneer'

    id = Column(String(36), default=lambda: str(uuid.uuid4()), primary_key=True)
    name = Column(String(50), nullable=True)
    decription = Column(String(8000), nullable=True)
    video_address = Column(String(2000), nullable=True)
    disable = Column(Boolean, default=lambda: False)
    icon = Column(String(2000), nullable=True)